﻿using sx_windows.pane.wifi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace sx_windows
{
    public partial class MainForm : WifiSettingContract.View
    {
        public string GetWifiName()
        {
            return this.wifiNameEdit.Text;
        }

        public string GetWifiPassword()
        {
            return this.wifiPasswordEdit.Text;
        }

        public void SetOpenWifiBtnText(string s)
        {
            this.openWifiBtn.Enabled = true;
            this.openWifiBtn.Text = s;
        }

        public void SetWifiName(string name)
        {
            this.wifiNameEdit.Text = name;
        }

        public void SetWifiPassword(string password)
        {
            this.wifiPasswordEdit.Text = password;
        }
        private void openWifiBtn_Click(object sender, EventArgs e)
        {
            wifiPresenter.OpenWifiBtnClick();
        }
        private void wifiUsageLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            SetOpenWifiBtnText("请稍后");
            this.openWifiBtn.Enabled = false;
            wifiPresenter.WifiUsageLinkClick();
        }
    }
}
